﻿//#define DEBUG

#region

using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;
using System.ServiceProcess;

#endregion

namespace BuildMotion.MotionTracker.ServiceHost
{
    [RunInstaller(true)]
    public partial class MotionTrackerWindowsServiceInstaller : Installer
    {
        public MotionTrackerWindowsServiceInstaller()
        {
//#if DEBUG

//            Debugger.Launch();

//#endif

            ServiceProcessInstaller processInstaller = new ServiceProcessInstaller();
            ServiceInstaller serviceInstaller = new ServiceInstaller();

            #region Account Logon Information

            processInstaller.Account = ServiceAccount.NetworkService;

            #endregion

            serviceInstaller.DisplayName = "MotionTracker Services";
            serviceInstaller.Description = "A WCF Service host for MotionTracker Services.";
            serviceInstaller.ServiceName = "MotionTracker";
            serviceInstaller.StartType = ServiceStartMode.Automatic;

            Installers.Add(processInstaller);
            Installers.Add(serviceInstaller);
        }

        private void serviceInstaller1_AfterInstall(object sender, InstallEventArgs e)
        {
        }

        private void serviceProcessInstaller1_AfterInstall(object sender, InstallEventArgs e)
        {
        }
    }
}